<template>
  <el-card>
    <table-body :diaForm="form" :rules="rules" :path="path">
      <template v-slot:dialogForm>
        <el-form-item label="课程名" prop="courseName" >
            <el-input v-model="form.courseName" clearable></el-input>
        </el-form-item>
        <el-form-item label="课时数" prop="courseHour" >
            <el-input v-model="form.courseHour" clearable></el-input>
        </el-form-item>
      </template>
      <template v-slot:tableBody>
        <el-table-column
           prop="courseName"
           label="课程名"
           width="180">
         </el-table-column>
         <el-table-column
            prop="courseHour"
            label="课时数"
            >
          </el-table-column>
      </template>
    </table-body>    
  </el-card>
</template>

<script>
  import tableBody from '../components/tableBody.vue'
  export default {
    components:{tableBody},
    data() {
      return {
        path:'course',
        form:{
          courseName:'',
          courseHour:''
        },
        rules:{
          courseName:[
            { required: true, message: '请输入课程名', trigger: 'blur' },
          ],
          courseHour:[
            { required: true, message: '请输入课时数', trigger: 'blur' },
          ],
        },
      }
    },
  }
</script>

<style>
</style>
